package com.ft.model;

import com.ft.model.enums.OrderStatusEnum;
import com.ft.typehandler.OrderStatusEnumTypeHandler;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;
import tk.mybatis.mapper.annotation.ColumnType;

import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * @author: zhangjianghua
 * @Date: 2018-10-09 16:54
 */
@Data
@Table(name = "platform_order")
public class Order {
    @Id
    private Long id;
    /**
     * 订单总价格
     */
    private BigDecimal amount;
    /**
     * 订单状态
     */
    @ColumnType(jdbcType = JdbcType.INTEGER, typeHandler = OrderStatusEnumTypeHandler.class)
    private OrderStatusEnum status;

}
